package java3_14;

import java.util.Scanner;

public class Com_application {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        Company company = new Company();
        company.name = "北大青鸟职业教育";
        company.address = "马鞍山路";
        company.phoneNumber = "123456";
        company.range = "前端,Java全栈,UI设计";
        while (true){
            System.out.println("1.添加员工信息  2.输出员工信息  3.辞退员工  4.退出");
            int a = scanner.nextInt();
            switch (a){
                case 1:{
                    System.out.println("请输入员工姓名：");
                    String newName = scanner.next();
                    company.add(newName);
                    break;
                }
                case 2:{
                    System.out.println("员工信息如下:");
                    company.print();
                    break;
                }
                case 3:{
                    System.out.println("请输入要辞退的员工：");
                    String name = scanner.next();
                    company.dismiss(name);
                    break;
                }
                case 4:{
                    return;
                }
            }
        }
    }
}
